<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of actionsclass
 *
 * @author wlf
 */
if(!defined('TinyFW')) exit('Access denied!');
class Action extends tfAction {
    //put your code here

    public function generateModelAction() {
        $conn = tfDB::getConn();

        ob_start();
        echo "生成model";
        $this->assign("_hidemenu",1);
        $this->assign("_hidesidebar",1);


        if (Doctrine_Core::generateModelsFromDb( BASE_PATH . "models", array("tinyfw"),array('generateTableClasses' => true) ) ) {
            echo "成功";
        } else {
            echo "失败";
        }

        $content = ob_get_contents();
        ob_clean();
        $this->assign("content",$content);
        $this->render_layout("index.html");
        
    }
}
?>
